import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/Login.vue'
import Task from '@/pages/admin/task/List'
import Index from '@/pages/admin/Index'
import Emp from '@/pages/admin/emp/List'
import AdminIndex from '@/pages/admin/Home.vue'
import Bonus from '@/pages/admin/bons/List.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Login,
    },
    {
      path: '/admin',
      component: AdminIndex,
      redirect:'/admin/index',
      children:[
        {
          path: '/admin/index',
          name: '首页',
          component: Index,
        },
        {
          path: '/admin/emp/list',
          name: '员工列表',
          component: Emp,
        },
        {
          path: '/admin/task/list',
          name: '员工业务单子',
          component: Task,
        },
        {
          path: '/admin/bonus/list',
          name: 'Bonus',
          component: Bonus,
        },
      ]
    },
    
  ]
})
